package lab4;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

public class SCTest {
    public static void main(String[] args) {
        ReentrantLock lock = new ReentrantLock();
        Condition notFull = lock.newCondition();
        Condition  notEmpty = lock.newCondition();
        List<String> courses = new ArrayList<>();
        for (int i = 0; i < 10; ++i) {
            new CourseSelection(courses, notFull, notEmpty, lock).start();
        }
        for (int i = 0; i < 50; ++i){
            new Student(courses, notFull, notEmpty, lock).start();
        }
    }
}
